package com.mrd.gtimp.business.entity;

import com.mrd.gtimp.base.entity.User;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * Created by lenovo on 2016/9/20.
 */

/**
 * 查验货物详细表
 */
@Entity(name = "T_BIZ_INSPECTION_GOODS_DETIALS")
public class InspectionGoodsDetails implements Serializable {

    private static final long serialVersionUID = -5053725399947524627L;

    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "ID_")
    private String id;

    @ManyToOne
    @JoinColumn(name = "INSPECTION_ID_")
    private InspectionGoods inspectionGoods;

    /**
     * 查验时间/创建时间
     */
    @Column(name = "CREATE_TIME_")
    private Date createTime;

    /**
     * 实施查验单位
     */
    @Column(name = "INSPECTION_COMPANY_")
    private String inspectionCompany;

    /**
     * 其他实施查验单位，当查验单位选择其他时需要填写
     */
    @Column(name = "INSPECTION_EXT_")
    private String inspectionExt;

    /**
     * 查验项目
     */
    @Column(name = "INSPECTION_PROJECT_")
    private String inspectionProject;

    /**
     * 查验情况
     */
    @Column(name = "INSPECTION_SITUATION_")
    private String inspectionSituation;

    /**
     * 创建者
     */
    @ManyToOne
    @JoinColumn(name = "CREATOR_")
    private User creator;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public InspectionGoods getInspectionGoods() {
        return inspectionGoods;
    }

    public void setInspectionGoods(InspectionGoods inspectionGoods) {
        this.inspectionGoods = inspectionGoods;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getInspectionCompany() {
        return inspectionCompany;
    }

    public void setInspectionCompany(String inspectionCompany) {
        this.inspectionCompany = inspectionCompany;
    }

    public String getInspectionExt() {
        return inspectionExt;
    }

    public void setInspectionExt(String inspectionExt) {
        this.inspectionExt = inspectionExt;
    }

    public String getInspectionProject() {
        return inspectionProject;
    }

    public void setInspectionProject(String inspectionProject) {
        this.inspectionProject = inspectionProject;
    }

    public String getInspectionSituation() {
        return inspectionSituation;
    }

    public void setInspectionSituation(String inspectionSituation) {
        this.inspectionSituation = inspectionSituation;
    }

    public User getCreator() {
        return creator;
    }

    public void setCreator(User creator) {
        this.creator = creator;
    }

    @Override
    public String toString() {
        return "InspectionGoodsDetails{" +
                "id='" + id + '\'' +
                ", inspectionGoods=" + inspectionGoods +
                ", createTime=" + createTime +
                ", inspectionCompany='" + inspectionCompany + '\'' +
                ", inspectionExt='" + inspectionExt + '\'' +
                ", inspectionProject='" + inspectionProject + '\'' +
                ", inspectionSituation='" + inspectionSituation + '\'' +
                ", creator=" + creator +
                '}';
    }
}
